package com.fowo.api.service.handleWork.jindieEntity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@NoArgsConstructor
@Data
public class lXPurchaseOrder {


    @JsonProperty("code")
    private Integer code;
    @JsonProperty("message")
    private String message;
    @JsonProperty("error_details")
    private List<?> errorDetails;
    @JsonProperty("request_id")
    private String requestId;
    @JsonProperty("response_time")
    private String responseTime;
    @JsonProperty("data")
    private List<DataDTO> data;
    @JsonProperty("total")
    private Integer total;

    @NoArgsConstructor
    @Data
    public static class DataDTO {
        @JsonProperty("order_sn")
        private String orderSn;
        @JsonProperty("custom_order_sn")
        private String customOrderSn;
        @JsonProperty("supplier_id")
        private Long supplierId;
        @JsonProperty("supplier_name")
        private String supplierName;
        @JsonProperty("opt_uid")
        private Long optUid;
        @JsonProperty("opt_realname")
        private String optRealname;
        @JsonProperty("create_time")
        private String createTime;
        @JsonProperty("order_time")
        private String orderTime;
        @JsonProperty("purchase_currency")
        private String purchaseCurrency;
        @JsonProperty("shipping_currency")
        private String shippingCurrency;
        @JsonProperty("purchase_rate")
        private String purchaseRate;
        @JsonProperty("status_shipped")
        private Long statusShipped;
        @JsonProperty("status_shipped_text")
        private String statusShippedText;
        @JsonProperty("quantity_total")
        private Long quantityTotal;
        @JsonProperty("payment")
        private String payment;
        @JsonProperty("pay_status")
        private Long payStatus;
        @JsonProperty("pay_status_text")
        private String payStatusText;
        @JsonProperty("auditor_uid")
        private Long auditorUid;
        @JsonProperty("auditor_time")
        private String auditorTime;
        @JsonProperty("auditor_realname")
        private String auditorRealname;
        @JsonProperty("last_uid")
        private Long lastUid;
        @JsonProperty("last_time")
        private String lastTime;
        @JsonProperty("last_realname")
        private String lastRealname;
        @JsonProperty("purchaser_id")
        private Long purchaserId;
        @JsonProperty("contact_person")
        private String contactPerson;
        @JsonProperty("contact_number")
        private String contactNumber;
        @JsonProperty("settlement_method")
        private Integer settlementMethod;
        @JsonProperty("settlement_description")
        private String settlementDescription;
        @JsonProperty("payment_method")
        private Integer paymentMethod;
        @JsonProperty("reason")
        private String reason;
        @JsonProperty("wid")
        private Long wid;
        @JsonProperty("is_tax")
        private Long isTax;
        @JsonProperty("status")
        private Long status;
        @JsonProperty("status_text")
        private String statusText;
        @JsonProperty("ware_house_name")
        private String wareHouseName;
        @JsonProperty("ware_house_bak_name")
        private String wareHouseBakName;
        @JsonProperty("shipping_price")
        private String shippingPrice;
        @JsonProperty("amount_total")
        private String amountTotal;
        @JsonProperty("other_fee")
        private String otherFee;
        @JsonProperty("other_currency")
        private String otherCurrency;
        @JsonProperty("fee_part_type")
        private Long feePartType;
        @JsonProperty("total_price")
        private String totalPrice;
        @JsonProperty("icon")
        private String icon;
        @JsonProperty("remark")
        private String remark;
        @JsonProperty("quantity_entry")
        private Long quantityEntry;
        @JsonProperty("quantity_real")
        private Long quantityReal;
        @JsonProperty("quantity_receive")
        private Long quantityReceive;
        @JsonProperty("update_time")
        private String updateTime;
        @JsonProperty("logistics_info")
        private List<?> logisticsInfo;
        @JsonProperty("item_list")
        private List<ItemListDTO> itemList;

        @NoArgsConstructor
        @Data
        public static class ItemListDTO {
            @JsonProperty("id")
            private Long id;
            @JsonProperty("plan_sn")
            private String planSn;
            @JsonProperty("product_id")
            private Long productId;
            @JsonProperty("product_name")
            private String productName;
            @JsonProperty("wid")
            private Long wid;
            @JsonProperty("ware_house_name")
            private String wareHouseName;
            @JsonProperty("sku")
            private String sku;
            @JsonProperty("fnsku")
            private String fnsku;
            @JsonProperty("sid")
            private Long sid;
            @JsonProperty("price")
            private String price;
            @JsonProperty("amount")
            private String amount;
            @JsonProperty("quantity_plan")
            private Long quantityPlan;
            @JsonProperty("quantity_real")
            private Integer quantityReal;
            @JsonProperty("quantity_per_case")
            private Long quantityPerCase;
            @JsonProperty("quantity_return")
            private Long quantityReturn;
            @JsonProperty("cases_num")
            private Long casesNum;
            @JsonProperty("msku")
            private List<String> msku;
            @JsonProperty("attribute")
            private List<AttributeDTO> attribute;
            @JsonProperty("tax_rate")
            private String taxRate;
            @JsonProperty("spu")
            private String spu;
            @JsonProperty("spu_name")
            private String spuName;
            @JsonProperty("quantity_entry")
            private Long quantityEntry;
            @JsonProperty("quantity_receive")
            private Long quantityReceive;
            @JsonProperty("quantity_qc")
            private Long quantityQc;
            @JsonProperty("quantity_qc_prepare")
            private Long quantityQcPrepare;
            @JsonProperty("expect_arrive_time")
            private String expectArriveTime;
            @JsonProperty("remark")
            private String remark;
            @JsonProperty("is_delete")
            private Long isDelete;

            @NoArgsConstructor
            @Data
            public static class AttributeDTO {
                @JsonProperty("attr_id")
                private Long attrId;
                @JsonProperty("attr_name")
                private String attrName;
                @JsonProperty("attr_value")
                private String attrValue;
            }
        }
    }
}
